<template>
	<view>
		<view style="" @click="show = true">
			<span>{{serveTime}}</span>
			<!-- <u-icon name="arrow-down-fill" ></u-icon> -->
		</view>
		<u-input v-model="yeyuan" placeholder="请选择幼儿园" type="select" @click="show=true" />
		<u-select v-model="show" :list="list" @confirm="onSelect1"></u-select>
	</view>
</template>

<script>
	export default {
		props: {

		},
		data() {
			return {
				list:[ { label: '阳光幼儿园', value: 'yg1' },
                { label: '彩虹幼儿园', value: 'ch1' },
                { label: '花朵幼儿园', value: 'hd1' }],
				show:false,
				yeyuan:'',
				defaultTime: [0, 0],
				show: false,
				serveTime: "请选择",

			}
		},
		created() {
			
		},
		methods: {
			onSelect1(arr) {
				// let current = arr[0];
				// console.log("current", current)
				// let label = current.label;
				// this.select1.current = current;
				// this.userInfo.sex = label;
				// console.log("this.userInfo.sex", this.userInfo.sex)
			},
			retFalse() {
				this.$emit("retFalse")
			},
			retTime(num) {
				if (num >= 10) {
					return num.toString()
				} else {
					return '0' + num.toString()
				}
			},
			timeConfirm(e) {
				// console.log("e",e)
				let dateList = e[0].value.split(' ')
				let timeList = e[1].value.split(' ')
				this.defaultTime = [dateList[1], timeList[1]]
				this.serveTime = dateList[0]
				this.$emit("getTime", this.serveTime)

			},
			getTimeList(valueMytime) {
				console.log("选择的时间", valueMytime)
				let itemList = []
				let sum = Math.floor(Math.random() * 90) + 10
				itemList.push({
					value: `0`,
					label: '当日可预约人数'+sum
				})
				return itemList;
			}
		}
	}
</script>

<style>
</style>